class Notifier < ActionMailer::Base
  def uploaded_cv(form)
    recipients 'chris@fstmarketing.com'
    from form[:email]
    subject "Application for position #{form[:jid]||'CV Just Received'}" 
    body "From: #{form[:name].humanize}\n\nEmail: #{form[:email]}\nCurrent Salary: #{form[:current_salary]||'not specified'}\nSalary sought: #{form[:salary_sought]||'not specified'}\nNotice period: #{form[:notice_period]||'not specified'}\nCar driver? #{form[:car_driver]||'not specified'}\n Preferred locations: #{form[:preferred_locations]||'not specified'}\n Reason for leaving: #{form[:reason_for_leaving]||'not specified'}\n\n"
    attachment :content_type => 'application/octet-stream',
               :body => form[:cv].read,
               :filename => form[:cv].original_filename
  end
end